package com.db.onlinedb.utils;

import lombok.AllArgsConstructor;
import lombok.Data;

import java.util.Objects;

/**
 * 连接标识
 */
@Data
@AllArgsConstructor
public class LinkName {
    private String host;
    private String linkName;

    @Override
    public int hashCode() {
        return Objects.hash(host, linkName);
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        LinkName ln = (LinkName) o;
        return host.equals(ln.host) && linkName.equals(((LinkName) o).linkName);
    }
}
